home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / SCOAST.CMD < prev    next >
Encoding:
Text File  |  1996-02-13  |  1.9 KB  |  113 lines

  1. #        TRUMPET WINSOCK LOGIN.CMD FOR 
  2. #         SOUTH COAST COMPUTING SERVICES, INC.
  3. #
  4. #trace on
  5. #
  6. # set up some strings for dialling up
  7. #
  8. if ![load $number]
  9.   if [query $number "Enter your dial up phone number"]
  10.     save $number
  11.   end
  12. end
  13. if ![load $username]
  14.   if [username "Enter your login username"]
  15.     save $username
  16.   end
  17. end
  18. if ![load $password]
  19.   if [password "Enter your login password"]
  20.     save $password
  21.   end
  22. end
  23. $modemsetup = "&f"
  24. $prompt = "election"
  25. $userprompt = "ogin:"
  26. $passprompt = "ssword:"
  27. $slipcmd = "slip"
  28. $addrtarg = "Your address is"
  29. $pppcmd = "ppp"
  30.  
  31. %attempts = 10
  32. #
  33. #
  34. #----------------------------------------------------------
  35. #
  36. # initialize modem
  37. #
  38. output "at"$modemsetup\13
  39. if ! [input 10 OK\n]
  40.   display "Modem is not responding"\n
  41.   abort
  42. end
  43. #
  44. # send phone number
  45. #
  46. %n = 0
  47. repeat
  48.   if %n = %attempts
  49.     display "Too many dial attempts"\n
  50.     abort
  51.   end
  52.   output "atdt"$number\13
  53.   %ok = [input 60 CONNECT]
  54.   %n = %n + 1
  55. until %ok
  56. input 10 \n
  57. #
  58. #  wait till it's safe to send because some modem's hang up
  59. #  if you transmit during the connection phase
  60. #
  61. wait 30 dcd
  62. #
  63. # now prod the terminal server
  64. #
  65. output \13
  66. #
  67. #  wait for the username prompt
  68. #
  69. input 30 $userprompt
  70. output $username\13
  71. #
  72. # and the password
  73. #
  74. input 30 $passprompt
  75. output $password\13
  76. #
  77. # we are now logged in
  78. #
  79. input 30 $prompt
  80. if %ppp
  81.   #
  82.   # jump into ppp mode
  83.   #
  84.   output $pppcmd\13
  85.   #
  86.   input 30 \n
  87.   #
  88.   display "PPP mode selected.  Will try to negotiate IP address."\n
  89.   #
  90. else
  91.   #
  92.   # jump into slip mode
  93.   #
  94.   output $slipcmd\13
  95.   #
  96.   # wait for the address string
  97.   #
  98.   input 30 $addrtarg
  99.   #
  100.   # parse address
  101.   #
  102.   address 30
  103.   input 30 \n
  104.   #
  105.   # we are now connected, logged in and in slip mode.
  106.   #
  107.   display \n
  108.   display Connected.  Your IP address is \i.\n
  109. end
  110. #
  111. # now we are finished.
  112. #
  113.